package mysql

import (
	"gorm.io/gorm"
)

type OrderZye3 struct {
	gorm.Model
	UserId  int64   `gorm:"type:int(10);comment:用户id;"`
	GoodsSn string  `gorm:"type:varchar(100);comment:商品编号;"`
	Amount  float32 `gorm:"type:decimal(10,2);comment:总金额;"`
	Payment int8    `gorm:"type:tinyint(1);comment:商品状态 1支付宝 2微信 3银联;"`
	Status  int8    `gorm:"type:tinyint(1);comment:订单状态 1代表已支付 0代表未支付 2代表支付失败;"`
}

// 新增订单
func (o *OrderZye3) CreateOrder() error {
	return DB.Create(&o).Error
}
